<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="p" uri="/WEB-INF/tld/pagination.tld"%> 
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8">
		<title>采购订单管理</title>
		<link rel="stylesheet" type="text/css" href="css/public.css">
		<script language="JavaScript" src="js/public.js"></script>
		<script type="text/javascript" src="js/date1.js"></script>
		<script type="text/javascript" src="js/sorttable.js"></script>
	</head>
	<body>
		<div id="info_all">
			<div id="info_top">
				采购订单管理
			</div>
			<!-- 主输入区 -->
			<!-- 功能按钮 -->
			<div id="btn">
			<input type="button" value="新增" onClick="addAction('addInputStockOrder')"
				onFocus="this.blur()" onMouseOver="this.className='btnover'"
				onmouseout="this.className='btnout'" class="btnsize" />
			<input type="button" value="修改" onClick="" onFocus="this.blur()"
				onmouseover="this.className='btnover'"
				onmouseout="this.className='btnout'" class="btnsize" />
			<input type="button" value="删除" onClick="" onFocus="this.blur()"
				onmouseover="this.className='btnover'"
				onmouseout="this.className='btnout'" class="btnsize" />
			<input type="button" value="上查" onClick="" onFocus="this.blur()"
				onmouseover="this.className='btnover'"
				onmouseout="this.className='btnout'" class="btnsize" />
			<input type="button" value="下查" onClick="" onFocus="this.blur()"
				onmouseover="this.className='btnover'"
				onmouseout="this.className='btnout'" class="btnsize" />
			<input type="button" value="审核" onClick="" onFocus="this.blur()"
				onmouseover="this.className='btnover'"
				onmouseout="this.className='btnout'" class="btnsize" />
			<input type="button" value="反审核" onClick="" onFocus="this.blur()"
				onmouseover="this.className='btnover'"
				onmouseout="this.className='btnout'" class="btnsize" />
			<input type="button" value="作废" onClick="" onFocus="this.blur()"
				onmouseover="this.className='btnover'"
				onmouseout="this.className='btnout'" class="btnsize" />
			<input type="button" value="反作废" onClick="" onFocus="this.blur()"
				onmouseover="this.className='btnover'"
				onmouseout="this.className='btnout'" class="btnsize" />
			<input type="button" value="关闭" onClick="" onFocus="this.blur()"
				onmouseover="this.className='btnover'"
				onmouseout="this.className='btnout'" class="btnsize" />
			<input type="button" value="反关闭" onClick="" onFocus="this.blur()"
				onmouseover="this.className='btnover'"
				onmouseout="this.className='btnout'" class="btnsize" />
			<input type="button" value="明细" onClick="showPHiRPDetail()" onFocus="this.blur()"
					onmouseover="this.className='btnover'"
					onmouseout="this.className='btnout'" class="btnsize" />

		</div>
			<s:form action="showStockOrders.action" method="post" theme="simple"
				cssClass="submitForm">
				<div id="info_main">
					<!-- 查询栏 -->

					<div id="select">
						<hr>
						<table>
							<tr>
								<td width="55">
									采购单号
								</td>
								<td width="120px">
									<s:textfield name="stockOrderModel.stockCode" size="12"></s:textfield>
								</td>
								<td width="55">
									审核状态
								</td>
								<td width="110px">
									<s:select list="#{'2':'全部','0':'未审核','1':'审核'}" cssStyle="width:107px"
										name="stockOrderModel.isAuditing"></s:select>
								</td>

								<td width="55px">
									采购日期
								</td>

								<td width="120px">
									<s:textfield name="startDate" size="12" readonly="true"
										cssClass="hand" onclick="calendar.setHook(this)"></s:textfield>

								</td>
								<td width="30px">
									到
								</td>
								<td width="110px">
									<s:textfield name="endDate" size="12" readonly="true"
										cssClass="hand" onclick="calendar.setHook(this)"></s:textfield>
								</td>
							</tr>
						</table>
					</div>
					<div class="sele">
						<input type="submit" value="查询" onFocus="this.blur()"
							onmouseover="this.className='btnover'"
							onmouseout="this.className='btnout'" class="btnsize" />
						<input type="reset" value="重置" onFocus="this.blur()"
							onmouseover="this.className='btnover'"
							onmouseout="this.className='btnout'" class="btnsize" />
						<hr>
					</div>
					<!-- 信息显示栏 -->
					<div id="info_info1">
						<table id="info_table" width="1280px" cellspacing=1px
							cellpadding=1px class="sortable">
							<thead>
								<tr>
									<th>
										<input type="checkbox" onClick="selectAll()" />
									</th>
									<th width="80px">
										审核标志
									</th>
									<th width="80px">
										作废标志
									</th>
									<th width="80px">
										关闭标志
									</th>
									<th width="100px">
										日期
									</th>
									<th width="90px">
										单据编号
									</th>
									<th width="80px">
										结算方式
									</th>
									<th width="90px">
										结算日期
									</th>
									<th width="120px">
										供应商
									</th>
									<th width="70px">
										币别
									</th>
									<th width="140px">
										摘要
									</th>
									<th width="80px">
										部门
									</th>
									<th>
										审核人
									</th>
									<th width="70px">
										业务员
									</th>
									<th width="70px">
										主管
									</th>

								</tr>
							</thead>
							<tbody>
								<s:iterator value="stockOrders">
									<tr>
										<td>
											<s:checkbox name="rowlist"
												fieldValue="%{stockOrder.stockOrderId}"
												onclick="alert(%{stockOrder.stockOrderId})"></s:checkbox>
											&nbsp;
										</td>

										<s:if test="stockOrder.isAuditing==0">
											<td>
												未审核
											</td>
										</s:if>
										<s:elseif test="stockOrder.isAuditing==1">
											<td>
												审核
											</td>
										</s:elseif>

										<s:if test="stockOrder.isCancel==0">
											<td>
												未作废
											</td>
										</s:if>
										<s:elseif test="stockOrder.isCancel==1">
											<td>
												作废
											</td>
										</s:elseif>

										<s:if test="stockOrder.isClosed==0">
											<td>
												未关闭
											</td>
										</s:if>
										<s:elseif test="stockOrder.isClosed==1">
											<td>
												反关闭
											</td>
										</s:elseif>
										<td>
											<s:property value="stockOrder.builtTime" />
										</td>
										<td>
											<s:property value="stockOrder.stockCode" />
										</td>
										<td>
											<s:property value="settlement.settlementName" />
										</td>
										<td>
											<s:property value="stockOrder.balanceDate" />
										</td>
										<td>
											<s:property value="supplier.supplierName" />
										</td>
										<td>
											<s:property value="currency.currencyName" />
											&nbsp;
										</td>
										<td>
											<s:property value="stockOrder.remark" />
											&nbsp;
										</td>
										<td>
											<s:property value="department.departmentName" />
											&nbsp;
										</td>
										<td>
											<s:property value="auditinger.candiateName" />
											&nbsp;
										</td>
										<td>
											<s:property value="businesser.candiateName" />
											&nbsp;
										</td>
										<td>
											<s:property value="manager.candiateName" />
											&nbsp;
										</td>
									</tr>
								</s:iterator>

							</tbody>
							<tfoot>
							</tfoot>
						</table>
						<div align="center">
							<font color="black"> 共<s:property value="page.total" />
								页 第 <s:property value="page.cpage" /> 页 <p:page
									cpage="%{page.cpage}" total="%{page.total}" url="%{page.url}" />
							</font>

						</div>
						<script language="javascript">  
						//("表格名称","奇数行背景","偶数行背景","点击后背景");
						 mouseclick("info_table","#ffffff","#ffffff","#e6f0fd");
						 //("表格名称","奇数行背景","偶数行背景");
						 //setcolor("t","#ffffff","#ffffff");
					</script>
					</div>
				</div>
			</s:form>
		</div>
	</body>
</html>

